package com.rsscollector.util;

/**
 * Created by IntelliJ IDEA.
 * User: Vu Nga
 * Date: Mar 26, 2007
 * Time: 12:30:10 AM
 * To change this template use File | Settings | File Templates.
 */
public class StringUtil {
    /**
     * Returns true if the given string is either null or an empty string
     * after the white space is trimmed off of both ends.
     *
     * @param str The String to check
     * @return 'true' if the given string trimmed is empty (or null), 'false' otherwise
     */
    public static boolean isEmpty(String str) {

        if (str == null) {
            return true;
        }

        if (str.trim().equals("")) {
            return true;
        }

        return false;

    }
    
}
